import imp
from system_app import models

# 验证用户名和密码是否正确
def login(user_name, password):
    isValidate = False
    # 查询用户user 是否存在
    user_obj = models.admin_user.objects.filter(user_name=user_name).first()
    if user_obj:
        if password == user_obj.password:
            isValidate = True
    return isValidate
